Conversation
Greptile SummaryThis PR is a temporary workaround for RequestNetwork/requestNetwork#1713: it re-labels the two Tron tokens (USDT-tron, USDC-tron) from Key points from the review:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Consumer fetches token-list v1.5.1] --> B{Filter by type}
B -->|type === 'ERC20'| C[EVM token set\nETH, MATIC, BSC… tokens]
B -->|type === 'ERC20'| D[⚠️ USDT-tron\nnetwork: tron\naddress: TR7NH…]
B -->|type === 'ERC20'| E[⚠️ USDC-tron\nnetwork: tron\naddress: TEkxi…]
B -->|type === 'TRC20'| F[Empty — no tokens match\nTRC20 temporarily unused]
C --> G[EVM operation ✅]
D --> H{Consumer checks network?}
E --> H
H -->|Yes — skips tron entries| I[Safe ✅]
H -->|No — passes to EVM handler| J[Invalid address error ❌\ne.g. ethers.getAddress throws]
Last reviewed commit: "fix: remove trailing..." |
|
@greptileai review |
| @@ -8187,7 +8187,7 @@ | |||
| "decimals": 6, | |||
| "address": "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8", | |||
| "network": "tron", | |||
| "type": "TRC20", | |||
| "type": "ERC20", | |||
There was a problem hiding this comment.
ERC20 type on Tron network creates semantic collision for consumers
Both Tron tokens now carry "type": "ERC20" while retaining "network": "tron". Any downstream consumer that routes payments or builds transaction data based solely on type === "ERC20" will now encounter these Tron addresses in an EVM context. Tron addresses (e.g. TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) are not valid EVM addresses, so any EVM-side operation (e.g. ABI encoding, ethers.utils.getAddress normalisation, smart contract calls) attempted against them will either throw or silently produce wrong output.
Consumers who correctly pair type with network will be unaffected, but anyone who trusts type alone—which is the primary filter field exposed by the schema—will be exposed to this mismatch. It is worth explicitly documenting this caveat in the PR/changelog (beyond the TODO comment in the enum) so that integrators are aware they must also check network !== "tron" when processing "type": "ERC20" entries for the duration of this workaround.
|
Closing this, we decided to implement this bandaid on our API 👍 |

TL;DR
Temporarily changed Tron token types from TRC20 to ERC20 as a workaround for issue #1713
What changed?
How to test?
Why make this change?
This is a temporary workaround to address issue #1713 in the RequestNetwork repository. The change allows Tron tokens to function properly until the underlying issue with TRC20 token handling is resolved.